package pojo;

import anna.ExcelConfig;
import anna.ExcelField;

import java.util.Optional;

@ExcelConfig
public class PostResult {

    /**
     * 请求地址
     */
    @ExcelField(index = 0,value = "url")
    private String url;
    /**
     * 请求参数
     */
    @ExcelField(index = 1,value = "request")
    private String request;
    /**
     * 请求结果
     */
    @ExcelField(index = 2,value = "result")
    private String result;
    /**
     * 耗时
     */
    @ExcelField(index = 3,value = "time")
    private Long time;
    /**
     * 请求结果类型(SUCCESS,FAIL,ERROR)
     */
    @ExcelField(index = 4,value = "resultType")
    private String resultType;
    /**
     * 错误码
     */
    @ExcelField(index = 5,value = "errorCode")
    private String errorCode;
    /**
     * 是否执行了对比
     */
    @ExcelField(index = 6,value = "compa")
    private String compa;
    /**
     * 对比结果类型
     */
    @ExcelField(index = 7,value = "compaResultType")
    private String compaResultType;
    /**
     * 对比地址
     */
    @ExcelField(index = 8,value = "compaUrl")
    private String compaUrl;
    /**
     * 对比结果
     */
    @ExcelField(index = 9,value = "compaResult")
    private String compaResult;
    /**
     * 对比耗时
     */
    @ExcelField(index = 10,value = "compaTime")
    private Long compaTime;

    public String getUrl() {
        url = Optional.ofNullable(url).orElse("");
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getRequest() {
        request = Optional.ofNullable(request).orElse("");
        return request;
    }

    public void setRequest(String request) {
        this.request = request;
    }

    public String getResult() {
        result = Optional.ofNullable(result).orElse("");
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public Long getTime() {
        time = Optional.ofNullable(time).orElse(0L);
        return time;
    }

    public void setTime(Long time) {
        this.time = time;
    }

    public String getResultType() {
        resultType = Optional.ofNullable(resultType).orElse("");
        return resultType;
    }

    public void setResultType(String resultType) {
        this.resultType = resultType;
    }

    public String getErrorCode() {
        errorCode = Optional.ofNullable(errorCode).orElse("");
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getCompaResultType() {
        compaResultType = Optional.ofNullable(compaResultType).orElse("");
        return compaResultType;
    }

    public void setCompaResultType(String compaResultType) {
        this.compaResultType = compaResultType;
    }

    public String getCompaUrl() {
        compaUrl = Optional.ofNullable(compaUrl).orElse("");
        return compaUrl;
    }

    public void setCompaUrl(String compaUrl) {
        this.compaUrl = compaUrl;
    }

    public String getCompaResult() {
        compaResult = Optional.ofNullable(compaResult).orElse("");
        return compaResult;
    }

    public void setCompaResult(String compaResult) {
        this.compaResult = compaResult;
    }

    public Long getCompaTime() {
        compaTime = Optional.ofNullable(compaTime).orElse(0L);
        return compaTime;
    }

    public void setCompaTime(Long compaTime) {
        this.compaTime = compaTime;
    }

    public String getCompa() {
        compa = Optional.ofNullable(compa).orElse("");
        return compa;
    }

    public void setCompa(String compa) {
        this.compa = compa;
    }
}
